package CreationalPatterns.AbstractFactory;

import CreationalPatterns.AbstractFactory.factory.AbstractFactory;
import CreationalPatterns.AbstractFactory.product.AbstractChair;
import CreationalPatterns.AbstractFactory.product.AbstractCoffeeTable;
import CreationalPatterns.AbstractFactory.product.AbstractSofa;
import utils.XMLUtil;

public class Client {
    public static void main(String[] args) {
        AbstractFactory factory = (AbstractFactory) XMLUtil.getBean("AbstractFactory");

        AbstractChair chair = factory.createChair();
        chair.sitOn();

        AbstractCoffeeTable coffeeTable = factory.createCoffeeTable();
        coffeeTable.placeCoffee();

        AbstractSofa sofa = factory.createSofa();
        sofa.batchSitOn();
    }
}
